package org.planaz.campusvoting.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.planaz.campusvoting.common.result.Result;
import org.planaz.campusvoting.dto.req.UserQueryReq;
import org.planaz.campusvoting.dto.req.UserRegisterReq;
import org.planaz.campusvoting.pojo.User;
import org.springframework.stereotype.Service;

@Service
public interface UserService extends IService<User> {
    Result<?> login(String username, String password);

    Result<?> register(UserRegisterReq userRegisterReq);

    Result<?> loginByEmail(String email, String code);

    Result<?> registerByEmail(String email, String password, String code);

    Result<?> resetPasswordByEmail(String email, String password, String code);

    Result<?> resetPassword(String password);

    Result<?> resetEmail(String email, String code);

    Result<?> getUserInfo();

    Result<?> changeUserInfo(User userInfo);

    Result<?> query(Page<User> userPage, UserQueryReq userQueryReq);

    Result<?> ban(Long id);

    Result<?> unBan(Long id);
}
